package com.hdl.io;

import java.io.InputStream;

/**
 * @author hedonglin
 * @date 2020/4/21 7:35
 * @description
 */
public class Resources {

    /**
     * 根据配置文件的路径，将配置文件加载到字节输入流，存储在内存中
     * @param path 配置文件路径
     * @return 字节输入流
     */
    public static InputStream getResourceAsStream(String path){
        InputStream resourceAsStream = Resources.class.getClassLoader().getResourceAsStream(path);
        return resourceAsStream;
    }
}
